using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class ShakeBuffer : GeneratedMessageLite<ShakeBuffer, ShakeBuffer.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<ShakeBuffer, ShakeBuffer.Builder>
		{
			private bool resultIsReadOnly;
			private ShakeBuffer result;
			protected override ShakeBuffer.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override ShakeBuffer MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override ShakeBuffer DefaultInstanceForType
			{
				get
				{
					return ShakeBuffer.DefaultInstance;
				}
			}
			public uint ReportTime
			{
				get
				{
					return this.result.ReportTime;
				}
				set
				{
					this.SetReportTime(value);
				}
			}
			public uint X
			{
				get
				{
					return this.result.X;
				}
				set
				{
					this.SetX(value);
				}
			}
			public uint Y
			{
				get
				{
					return this.result.Y;
				}
				set
				{
					this.SetY(value);
				}
			}
			public Builder()
			{
				this.result = ShakeBuffer.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(ShakeBuffer cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private ShakeBuffer PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					ShakeBuffer other = this.result;
					this.result = new ShakeBuffer();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override ShakeBuffer.Builder Clear()
			{
				this.result = ShakeBuffer.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override ShakeBuffer.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new ShakeBuffer.Builder(this.result);
				}
				return new ShakeBuffer.Builder().MergeFrom(this.result);
			}
			public override ShakeBuffer BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override ShakeBuffer.Builder MergeFrom(IMessageLite other)
			{
				if (other is ShakeBuffer)
				{
					return this.MergeFrom((ShakeBuffer)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override ShakeBuffer.Builder MergeFrom(ShakeBuffer other)
			{
				return this;
			}
			public override ShakeBuffer.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override ShakeBuffer.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(ShakeBuffer._shakeBufferFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = ShakeBuffer._shakeBufferFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 8u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 8u)
						{
							this.result.hasReportTime = input.ReadUInt32(ref this.result.reportTime_);
							continue;
						}
					}
					else
					{
						if (num3 == 16u)
						{
							this.result.hasX = input.ReadUInt32(ref this.result.x_);
							continue;
						}
						if (num3 == 24u)
						{
							this.result.hasY = input.ReadUInt32(ref this.result.y_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public ShakeBuffer.Builder SetReportTime(uint value)
			{
				this.PrepareBuilder();
				this.result.hasReportTime = true;
				this.result.reportTime_ = value;
				return this;
			}
			public ShakeBuffer.Builder ClearReportTime()
			{
				this.PrepareBuilder();
				this.result.hasReportTime = false;
				this.result.reportTime_ = 0u;
				return this;
			}
			public ShakeBuffer.Builder SetX(uint value)
			{
				this.PrepareBuilder();
				this.result.hasX = true;
				this.result.x_ = value;
				return this;
			}
			public ShakeBuffer.Builder ClearX()
			{
				this.PrepareBuilder();
				this.result.hasX = false;
				this.result.x_ = 0u;
				return this;
			}
			public ShakeBuffer.Builder SetY(uint value)
			{
				this.PrepareBuilder();
				this.result.hasY = true;
				this.result.y_ = value;
				return this;
			}
			public ShakeBuffer.Builder ClearY()
			{
				this.PrepareBuilder();
				this.result.hasY = false;
				this.result.y_ = 0u;
				return this;
			}
		}
		public const int ReportTimeFieldNumber = 1;
		public const int XFieldNumber = 2;
		public const int YFieldNumber = 3;
		private static readonly ShakeBuffer defaultInstance;
		private static readonly string[] _shakeBufferFieldNames;
		private static readonly uint[] _shakeBufferFieldTags;
		private bool hasReportTime;
		private uint reportTime_;
		private bool hasX;
		private uint x_;
		private bool hasY;
		private uint y_;
		private int memoizedSerializedSize = -1;
		public static ShakeBuffer DefaultInstance
		{
			get
			{
				return ShakeBuffer.defaultInstance;
			}
		}
		public override ShakeBuffer DefaultInstanceForType
		{
			get
			{
				return ShakeBuffer.DefaultInstance;
			}
		}
		protected override ShakeBuffer ThisMessage
		{
			get
			{
				return this;
			}
		}
		public uint ReportTime
		{
			get
			{
				return this.reportTime_;
			}
		}
		public uint X
		{
			get
			{
				return this.x_;
			}
		}
		public uint Y
		{
			get
			{
				return this.y_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasReportTime && this.hasX && this.hasY;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasReportTime)
				{
					num += CodedOutputStream.ComputeUInt32Size(1, this.ReportTime);
				}
				if (this.hasX)
				{
					num += CodedOutputStream.ComputeUInt32Size(2, this.X);
				}
				if (this.hasY)
				{
					num += CodedOutputStream.ComputeUInt32Size(3, this.Y);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private ShakeBuffer()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] shakeBufferFieldNames = ShakeBuffer._shakeBufferFieldNames;
			if (this.hasReportTime)
			{
				output.WriteUInt32(1, shakeBufferFieldNames[0], this.ReportTime);
			}
			if (this.hasX)
			{
				output.WriteUInt32(2, shakeBufferFieldNames[1], this.X);
			}
			if (this.hasY)
			{
				output.WriteUInt32(3, shakeBufferFieldNames[2], this.Y);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasReportTime)
			{
				num ^= this.reportTime_.GetHashCode();
			}
			if (this.hasX)
			{
				num ^= this.x_.GetHashCode();
			}
			if (this.hasY)
			{
				num ^= this.y_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			ShakeBuffer shakeBuffer = value as ShakeBuffer;
			return shakeBuffer != null && (this.hasReportTime == shakeBuffer.hasReportTime && (!this.hasReportTime || this.reportTime_.Equals(shakeBuffer.reportTime_))) && (this.hasX == shakeBuffer.hasX && (!this.hasX || this.x_.Equals(shakeBuffer.x_))) && (this.hasY == shakeBuffer.hasY && (!this.hasY || this.y_.Equals(shakeBuffer.y_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<ShakeBuffer, ShakeBuffer.Builder>.PrintField("ReportTime", this.hasReportTime, this.reportTime_, writer);
			GeneratedMessageLite<ShakeBuffer, ShakeBuffer.Builder>.PrintField("X", this.hasX, this.x_, writer);
			GeneratedMessageLite<ShakeBuffer, ShakeBuffer.Builder>.PrintField("Y", this.hasY, this.y_, writer);
		}
		public static ShakeBuffer ParseFrom(byte[] data)
		{
			return ShakeBuffer.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private ShakeBuffer MakeReadOnly()
		{
			return this;
		}
		public static ShakeBuffer.Builder CreateBuilder()
		{
			return new ShakeBuffer.Builder();
		}
		public override ShakeBuffer.Builder ToBuilder()
		{
			return ShakeBuffer.CreateBuilder(this);
		}
		public override ShakeBuffer.Builder CreateBuilderForType()
		{
			return new ShakeBuffer.Builder();
		}
		public static ShakeBuffer.Builder CreateBuilder(ShakeBuffer prototype)
		{
			return new ShakeBuffer.Builder(prototype);
		}
		static ShakeBuffer()
		{
			ShakeBuffer.defaultInstance = new ShakeBuffer().MakeReadOnly();
			ShakeBuffer._shakeBufferFieldNames = new string[]
			{
				"ReportTime",
				"X",
				"Y"
			};
			ShakeBuffer._shakeBufferFieldTags = new uint[]
			{
				8u,
				16u,
				24u
			};
			object.ReferenceEquals(micromsg.Proto.ShakeBuffer.Descriptor, null);
		}
	}
}
